home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / TEMP / GNU / bison / Examples < prev    next >
Text File  |  1995-06-28  |  1KB  |  29 lines

  1. Examples
  2. Previous: <Concepts=>Concepts> * Next: <Grammar File=>GrammarFil> * Up: <Top=>!Root>
  3.  
  4. #Wrap on
  5. {fH2}Examples{f}
  6.  
  7. Now we show and explain three sample programs written using Bison: a
  8. reverse polish notation calculator, an algebraic (infix) notation
  9. calculator, and a multi-function calculator.  All three have been tested
  10. under BSD Unix 4.3; each produces a usable, though limited, interactive
  11. desk-top calculator.
  12.  
  13. These examples are simple, but Bison grammars for real programming
  14. languages are written the same way.
  15. You can copy these examples out of the Info file and into a source file
  16. to try them.
  17.  
  18. #Wrap off
  19. <RPN Calc=>RPNCalc>:          Reverse polish notation calculator;
  20.                         a first example with no operator precedence.
  21. <Infix Calc=>InfixCalc>:        Infix (algebraic) notation calculator.
  22.                         Operator precedence is introduced.
  23. <Simple Error Recovery=>SimpleErro>:  Continuing after syntax errors.
  24. <Multi-function Calc=>Multifunct>:  Calculator with memory and trig functions.
  25.                            It uses multiple data-types for semantic values.
  26. <Exercises=>Exercises>:         Ideas for improving the multi-function calculator.
  27. #Wrap on
  28.  
  29.